import React from "react";
import { useLocation } from "react-router-dom";
function Chuan2() {
  const location = useLocation();
  const queryParams = new URLSearchParams(location.search);
  const name = queryParams.get("name");
  return (
    <div>
      <h1>传过来的参数: {name}</h1>
    </div>
  );
}

export default Chuan2;
